package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2024-12-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_platform_store")
public class PlatformStoreDo extends Model<PlatformStoreDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 平台
     */
    @TableField("platform_code")
    private String platformCode;

    /**
     * 店铺状态 0 禁用 1启用
     */
    @TableField("store_status")
    private Integer storeStatus;

    /**
     * 店铺名称
     */
    @TableField("store_name")
    private String storeName;

    /**
     * 店铺代码
     */
    @TableField("store_code")
    private String storeCode;

    /**
     * 站点 
Amazon(类似国家) MX CA US
Mercado CBT(跨境) 其他正常国家code
TikTok 比较特殊的三个选项
shein 比较特殊的两个选项
Temu 美区US 欧区EU
     */
    @TableField("site")
    private String site;

    /**
     * shopify 店铺链接
     */
    @TableField("app_key")
    private String appKey;

    /**
     * 授权密钥
     */
    @TableField("app_secret")
    private String appSecret;

    @TableField("seller_id")
    private String sellerId;

    /**
     * 暗号键版本
     */
    @TableField("signature_version")
    private Integer signatureVersion;

    /**
     * titok-账号名称;Mercado-Mercado账户名
     */
    @TableField("seller_name")
    private String sellerName;

    /**
     * 授权状态 0授权中 1授权成功 2暂停同步 3授权失败 4授权过期
     */
    @TableField("auth_sync_status")
    private Integer authSyncStatus;

    /**
     * 预售 0是 1否
     */
    @TableField("presale")
    private Integer presale;

    /**
     * 乐天 商品 图像地址用的到
     */
    @TableField("shop_url")
    private String shopUrl;

    /**
     * 授权时间
     */
    @TableField("auth_sync_time")
    private Date authSyncTime;

    /**
     * 授权过期时间
     */
    @TableField("auth_expire_time")
    private Date authExpireTime;

    /**
     * Amazon  mws_auth_token
     * Yahoo refreshToken
     * 其他平台待定
     */
    @TableField("service_token")
    private String serviceToken;

    /**
     * Amazon-区域 
     * 北美州 NA
     * 日本/新加坡/澳洲 FE
     * 欧洲/阿联酋/沙特阿拉伯 EU
     */
    @TableField("region_code")
    private String regionCode;

    @TableField(value = "company_id", fill = FieldFill.INSERT)
    private Long companyId;

    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;

    @TableField(value = "delete_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleteFlag;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @TableField("update_time")
    private Date updateTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_by")
    private Long deleteBy;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
